<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>表格的便捷操作</title>
	<script type="text/javascript">
        window.onload = function(){
        	var oTab = document.getElementById('tab1');
        	alert(oTab.tBodies[0].rows[1].cells[1].innerHTML); //取出表格中的数据
        }
	</script>
</head>
<body>

    <table id="tab1" border="1" width="500px">
    	<thead>
    		<tr>
    			<td>ID</td>
    			<td>姓名</td>
    			<td>年龄</td>
    		</tr>
    	</thead>
    	<tbody>
    		<tr>
    			<td>1</td>
    			<td>Blue</td>
    			<td>27</td>
    		</tr>
    		<tr>
    			<td>2</td>
    			<td>小潘</td>
    			<td>27</td>
    		</tr>
    		<tr>
    			<td>3</td>
    			<td>邓狗</td>
    			<td>22</td>
    		</tr>
    		<tr>
    			<td>4</td>
    			<td>张三</td>
    			<td>23</td>
    		</tr>
    		<tr>
    			<td>5</td>
    			<td>李四</td>
    			<td>25</td>
    		</tr>
    		<tr>
    			<td>6</td>
    			<td>王五</td>
    			<td>21</td>
    		</tr>
    	</tbody>
    </table>
	
</body>
</html>